#ifndef SETTINGDLG_H
#define SETTINGDLG_H

#include <QDialog>

#include <QSqlDatabase>
#include <QSqlError>
#include <QStringList>
#include "textview.h"
#include "bmpbutton.h"
#include <QSqlQuery>

class QPrinter;

namespace Ui {
class SettingDlg;
}

class SettingDlg : public QDialog
{
    Q_OBJECT

public:
    explicit SettingDlg(QDialog *parent = nullptr);
    ~SettingDlg();

public:
    static QString ConfigFile;

private slots:

    void on_btExit_clicked();
    void on_btSave_clicked();

    void on_btAddjztime_clicked();
    void on_btAddjztimeupdate_clicked();
    void on_btAddjztimedelete_clicked();
    void on_btExcel_jzlog_clicked();
    void on_btExcel_dzlog_clicked();
    void on_btExcel_polog_clicked();

    void initTab0();
    void initTab1();
    void initTab2();
    void initTab3();
    void initTab4();

    void initListview1();
    void getData1();

    void initListview2();
    void getData2();

    void initListview3();
    void getData3();

    void initListview4();
    void getData4();

    void on_btOK_jzlog_clicked();

    void on_btOK_dzlog_clicked();

    void on_btExcel_polog_ok_clicked();

    void on_comboBox_currentIndexChanged(int index);

    void on_comboBox_2_currentIndexChanged(int index);

private:
    Ui::SettingDlg *ui;
    QSqlDatabase db;

    QList<int> idList1;
    int lastLanguage = 0;
    bool needreset = false;//是否重启
};

#endif // SETTINGDLG_H
